//
//  HMComPoseButton.swift
//  WeiBo
//
//  Created by 李立达 on 15/12/15.
//  Copyright © 2015年 heima11. All rights reserved.
//

import UIKit

class HMComPoseButton: UIButton {

  
    override var highlighted: Bool {
        set{
            
        }
        get{
            return false
        }
    }
  override init(frame: CGRect) {
        super.init(frame: frame)
    
    
        titleLabel?.textAlignment = .Center
        titleLabel?.font = UIFont.systemFontOfSize(14)
        setTitleColor(UIColor.darkGrayColor(), forState: UIControlState.Normal)
        imageView?.contentMode = .Center
    }
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func layoutSubviews() {
        super.layoutSubviews()
        
        imageView?.y = 0
        
        imageView?.width = width
        imageView?.height = width
        
        titleLabel?.x = 0
        titleLabel?.y = width
        titleLabel?.width = width
        titleLabel?.height = height - width
        
    }
    
}
